<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" ID="<%= Slh::Models::Version::VERSION %>" entityID="<%= @strategy.sp_entity_id %>">
    <md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:1.0:protocol">
      <md:Extensions>
        <% @matching_hosts.each do |host| %>
          <!-- BEGIN host <%= host.name %> -->
          <% host.sites.each do |site| %>
            <init:RequestInitiator xmlns:init="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Binding="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/Login"/>
          <% end %>
          <!-- END host <%= host.name %> -->
        <% end %>
      </md:Extensions>
      <md:KeyDescriptor>
        <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
          <ds:KeyName>IGNORED</ds:KeyName>
          <ds:X509Data>
            <ds:X509SubjectName>IGNORED</ds:X509SubjectName>
            <ds:X509Certificate><%= @strategy.key_originator_site.x509_certificate_string %></ds:X509Certificate>
          </ds:X509Data>
        </ds:KeyInfo>
      </md:KeyDescriptor>
      <% @matching_hosts.each do |host| %>
        <!-- BEGIN host <%= host.name %> -->

        <% host.sites.each do |site| %>
          <!-- BEGIN site <%= site.name %> -->
          <md:ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/Artifact/SOAP" index="0"/>
          <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/SAML2/POST" index="0"/>
          <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/SAML2/POST-SimpleSign" index="1"/>
          <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/SAML2/Artifact" index="2"/>
          <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/SAML2/ECP" index="3"/>
          <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/SAML/POST" index="4"/>
          <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" Location="<%= site.to_https_prefixed_name %>/Shibboleth.sso/SAML/Artifact" index="5"/>
          <!-- END site <%= site.name %> -->
        <% end %>
        <!-- END host <%= host.name %> -->
      <% end %>
    </md:SPSSODescriptor>
</md:EntityDescriptor>


